{layout name="./base/base_back"}		
		<link rel="stylesheet" type="text/css" href="/front/css/exchangeList.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/publishWish.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/jquery-ui.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/weifeng.css"/>
		<script src="/front/js/jquery-ui.js" type="text/javascript"></script>
		<script src="/front/js/index.js" type="text/javascript"></script>
		<script src="/front/js/weifeng.js" type="text/javascript"></script>
		<!--交换房车列表开始-->
		<div id="exchange-list-box">
			<!--搜素部分开始-->
			<div id="exchange-search-carvan">
				<div class="position-flow">
					<span style="font-size: 16px;">您的位置：</span>
					<span class="present-place"><a href="{php} echo url('/web/index','','','www') {/php}">首页 </a>> 选择房车 > 房车详情 > 在线支付 > 预订成功</span>
				</div>
				<div class="exchange-search-if">
					{if $login}
					<div class="exchange-first-step">
						<!-- <h3>第1步</h3> -->
						<span class="step-explain">分享房车，获得旅行币。</span>
						<span class="exchange-share"><a href= {php} echo url("/setcaravan/sharecaravan",'','','user') {/php} >点我分享</a></span>
						<span class="exchange-travel-coin ">您的旅行币余额：<i>{$integral}</i></span>
					</div>
					{/if}
					<div class="exchange-second-step">
						<form action="/filter/exlistform" method="get" id="exlistform">
							<!-- <h3>第2步</h3> -->
							<span class="step-explain">选择目的地</span>
							<div class="exchange-city">
								<label class="exchange-all-city">全部</label>
								{foreach $city as $k=>$v}
								<label for="{$k}" class="exchange-city-list">{$v|lang}<input type="radio" name="city" id="{$k}" value="{$k}" style="visibility: hidden;"/></label>
								{/foreach}
							</div>
							<!-- 交换房车列表页选择城市开始 -->
							<script type="text/javascript">
								$(function(){
									var a = '{:input('city')}';
									var b=new Array();
									b['Beijing'] = 1; b['Shanghai'] = 2;
									b['Sanya'] = 3;b['Chengdu'] = 4;
									b['Xian'] = 5;
									$("#exchange-list-box .exchange-city .exchange-city-list").eq(b[a]-1).css({backgroundColor:"#1E90FF",color:"#FFFFFF"});
									$("#exchange-list-box .exchange-city .exchange-all-city").css({backgroundColor:"#fff",color:"#000",border:"1px solid #ccc"});
									$("#exchange-list-box .exchange-city .exchange-city-list").click(function(){
										$(this).css({backgroundColor:"#1E90FF",color:"#FFFFFF"}).siblings('.exchange-city-list').css({backgroundColor:"",color:""});
										$("#exchange-list-box .exchange-city .exchange-all-city").css({backgroundColor:"#fff",color:"#000",border:"1px solid #ccc"});
									})
									$("#exchange-list-box .exchange-city .exchange-all-city").click(function(){
										$("#exchange-list-box .exchange-city .exchange-city-list").css({backgroundColor:"",color:""});
										$("#exchange-list-box .exchange-city .exchange-all-city").css({backgroundColor:"#1E90FF",color:"#fff"});
									})
								})
							</script>
							<!-- 交换房车列表页选择城市结束 -->
							<div class="exchange-time">
								<span class="explain-time">选择时间</span>
								<label for="">入住时间：<input id="selstartdate" value="{$s}" type="text" name="sdate"  placeholder="请选择入住时间"/></label>
								<label for="">离开时间：<input id="selendate" value="{$e}" type="text" name="edate"  placeholder="请选择离开时间"/></label>
							</div>
							<div class="exchange-button">
								<button type="submit">搜索房车</button>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!--旅行币不足提示框开始-->
			<div id="shsy-coin-bounced-box" style="display:none;">
				<div class="shsy-coin-bounced-bg"></div>
				<div id="shsy-coin-bounced">
					<div class="shsy-bounced-info">
						<div class="shsy-prompt-title">
							<p class="shsy-prompt">温馨提示</p>
							<p class="shsy-close">关闭</p>
						</div>
						<div class="shsy-prompt-cont" id="tishi-msg">您的旅行币余额不足，请分享房车或充值获得旅行币</div>
						<div class="shsy-prompt-over" id="tishi-share" style="display: none;">
							<a href={php} echo url("/setcaravan/sharecaravan",'','','user'){/php}>去分享</a>
						</div>
					</div>
				</div>
			</div>
			<script>
				$(function(){
					$(".shsy-close").click(function(){
						$("#shsy-coin-bounced-box").hide();
					})
				})
			</script>
			<!--搜素部分结束-->
			<!--搜素结果开始-->
			<div id="exchange-search-exact-result">
				{volist name='list1' id='vo'}
				<div class="search-result-list">
					<div class="exchange-carvan-img">
						<ul class="lunbo-img-box" >
							{if !empty($vo['caravan']['piccaravan']['0'])}
							<li class="lunbo-img-list"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.s}&edate={$vo.e}"><img src="{$vo.caravan.piccaravan['0']}" alt="车主未上传图片" /></a></li>
							{/if}
							{if !empty($vo['caravan']['piccaravan']['1'])}
							<li class="lunbo-img-list"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.s}&edate={$vo.e}"><img src="{$vo.caravan.piccaravan['1']}" alt="车主未上传图片" /></a></li>
							{/if}
							{if !empty($vo['caravan']['piccaravan']['2'])}
							<li class="lunbo-img-list"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.s}&edate={$vo.e}"><img src="{$vo.caravan.piccaravan['2']}" alt="车主未上传图片" /></a></li>
							{/if}
						</ul>
						<ul class="switch-img-btn">
						</ul>
					</div>
					<div class="exchange-caravan-impInfo">
						<h3>{$vo.caravan.name}</h3>
						<p>价格：
						{foreach $vo['jg'] as $k=>$v}
						{if $k==1}和{/if}
						<strong>{$v.amount}</strong>{$v['ch_types']}
						{/foreach}
						</p>
						<!-- <p>(节假日与双休日不同，请查看详情)</p> -->
						<p>可交换时间：<i>{$vo.sdate}</i>至<i>{$vo.edate}</i></p>
						<p><a href="###">{$vo.camp.name}</a></p>
						<p>地址：{$vo.camp.address}</p>
					</div>
					<ul class="exchange-caravan-basicInfo">
						<li>{$vo->getCates($vo['caravan']['car_cates_id'])}</li>
						<li>可住{$vo.caravan.people_num}人</li>
						<li>{$vo.caravan.double_bed_num}张双人床</li>
						<li>{$vo.caravan.single_bed_num}张单人床</li>
						<li>{$vo->getradioname($vo['caravan']['kitchen'])}厨房</li>
						<li>{$vo->getradioname($vo['caravan']['bathroom'])}洗手间</li>
					</ul>
					<div class="exchange-get-order">
						
						<p class="get-order-btn"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.sdate}&edate={$vo.edate}">查看详情</a> </p>
						<p class="get-order-btn"><a href="/reserve/jumpwhich?id={$vo.caravan.id}&sdate={$vo.sdate}&edate={$vo.edate}">直接下单</a> </p>
					</div>
				</div>
				{/volist}
				{if !empty($list1->toArray())}
				<div class="search-result-list">
					<span id="fpage" class="look-more">查看更多</span>
				</div>
				{/if}
				<!-- 加载列表一开始 -->
				<script type="text/javascript">
					$(document).ready(function(){
						var page = 2;
						var a = {$a};
						var b = {$b};				
						$("#fpage").click(function(){
							var filter_info = {};
							filter_info['sdate'] = $('#selstartdate').val();
							filter_info['edate'] = $('#selendate').val();
							filter_info['car_area'] = '{:input('city')}';
							//城市
							 $.ajax({
						        type:"post",
						        url:"/filter/ajaxlist1?"+Math.random(),
						        data:{'filter_info':filter_info,page:page},
						        dataType:'json',
						        success: function(data){
						        	page++;
						        	if (false==data) {
						        		 $('#fpage').text('没有更多信息了');
						        		 return;
						        	}
						        	$.each(data,function(vo,list)
						              {
						              	var str = '';
						              	var s = '';
						              	for (var i = 0; i < list.caravan.piccaravan.length; i++) {
						              		str += '<li class="lunbo-img-list"><a href=/reserve/caravandetail?id='+list.caravan.id+'&sdate='+list.sdate+'&edate='+list.edate+'><img src="'+list.caravan.piccaravan[i]+'" alt="车主未上传图片" /></a></li>';
						              	}
						              	for (var i = 0; i < list.jg.length; i++) {
						              		if (i == 1) {
						              			s = s + ' {:lang("and")} ';
						              		}
						              		s = s + '<strong>'+list.jg[i]['amount']+'</strong>' + list.jg[i]['ch_types'];
						              	}
						              $('#fpage').parent().before(
									    '<div class="search-result-list">'+
											'<div class="exchange-carvan-img">'+
												'<ul class="lunbo-img-box" >'+str+
												'</ul>'+
												'<ul class="switch-img-btn">'+
												'</ul>'+
											'</div>'+
											'<div class="exchange-caravan-impInfo">'+
												'<h3>'+list.caravan.name+'</h3>'+
												'<p>价格：'+
												s+
												'</p>'+
												'<p>可交换时间：<i>'+list.sdate+'</i>至<i>'+list.edate+'</i></p>'+'<p><a href="###">'+list.camp.name+'</a></p>'+
												'<p>地址：'+list.camp.address+'</p>'+
											'</div>'+
											'<ul class="exchange-caravan-basicInfo">'+
												'<li>'+a[list.caravan.car_cates_id]+'</li>'+
												'<li>'+list.caravan.people_num+'可住人</li>'+
												'<li>'+list.caravan.double_bed_num+'张双人床</li>'+
												'<li>'+list.caravan.single_bed_num+'张单人床</li>'+
												'<li>'+b[list.caravan.kitchen]+'厨房</li>'+
												'<li>'+b[list.caravan.bathroom]+'洗手间</li>'+
											'</ul>'+
											'<div class="exchange-get-order">'+
												'<p class="get-order-btn"><a href="/reserve/caravandetail?id='+list.caravan.id+'&sdate='+list.sdate+'&edate='+list.edate+'">查看详情</a> </p>'+
												'<p class="get-order-btn"><a href="/reserve/jumpwhich?id='+list.caravan.id+'&sdate='+list.sdate+'&edate='+list.edate+'">直接下单</a> </p>'+
											'</div>'+
										'</div>'
							             );
						             })
						        }
					      	});   
						})	    
					});
				</script>	
				<!-- 加载列表二结束 -->
				<!--没有搜索到结果start-->
				{if $login}
				<div class="search-result-fail">
					<div class="search-fail-prompt">
						<h2>抱歉，如果没有找到符合条件的结果</h2>
						<p>您可以看看以下为您推荐的其它城市或去发布心愿。让更多符合心愿的会员主动与您交换。</p>
					</div>
					<div class="release-need">
						<span href="">发布心愿</span>
						<!-- <a href={php} echo url("/wishs/create",'','','user') {/php}>发布需求</a> -->
					</div>
				</div>
				{/if}
				<!--没有搜索到结果end-->
				<!-- 发布需求弹框start -->
				<div class="wish-model-box">
					<div class="wish-model-bg"></div>
					<div class="wish-model">
						<h3>请准确填写您的心愿信息</h3>
						<span class="wish-model-close" style="background:#ea5404;color:#fff;border-radius:50%;padding:0px 8px;float:right;cursor:pointer;position:absolute;top:16px;right:16px;font-size:20px;">×</span>
						<h4 id="wish-model-info" style="text-align:center;color:#ea5404;font-size:16px;"></h4>
						<form action="javaScript:;" method="post" id="wishform">
							<hr style="width: 100%;">
							<div id="addressD">
								<label class="dizhi">出行目的地</label>
								<label for="11" class="city-list" style="background-color: #1E90FF; color: #FFFFFF;">北京
									<input type="radio" checked="checked" name="region" id="11" value="Beijing" style="visibility: hidden;"/>
								</label>
								<label for="12" class="city-list">上海
									<input type="radio" name="region" id="12" value="Shanghai" style="visibility: hidden;"/>
								</label>
								<label for="13" class="city-list">三亚
									<input type="radio" name="region" id="13" value="Sanya" style="visibility: hidden;"/>
								</label>
								<label for="14" class="city-list">成都
									<input type="radio" name="region" id="14" value="Chengdu" style="visibility: hidden;"/>
								</label>
								<label for="15" class="city-list">西安
									<input type="radio" name="region" id="15" value="Xian" style="visibility: hidden;"/>
								</label>
							</div>
							<div class="form-group-input">
								<label for="">出行日期</label>
								<input type="text" name="start_date" value="{:input('sdate')}" id="_startDate" placeholder="请输入开始日期">
								<span>至</span>
								<input type="text" name="end_date" value="{:input('edate')}" id="_endDate" placeholder="请输入结束日期">
							</div>
							<div class="form-group-input">
								<label for="">悬赏旅行币</label>
								<input type="text" name="travel_coin" placeholder="请输入旅行币数量">
							</div>
							<div class="form-group-input">
								<button id="submit" type="submit">发布</button>
								<span class="wish-model-back">返回</span>
							</div>
						</form>
					</div>
				</div>
				<script>
					// 选择城市
					$("#addressD .city-list").click(function(){
						$(this).css({backgroundColor:"#1E90FF",color:"#FFFFFF"}).siblings('.city-list').css({backgroundColor:"",color:""});
					})
					// 选择时间
					$("#_startDate,#_endDate").datepicker({
					    showOtherMonths: true,
					    selectOtherMonths: true,
					    minDate:0,
					    onSelect:function(dateText,inst){
				  		$("#_endDate").datepicker("option","minDate",dateText);
				        //$("#_endDate").datepicker("option","maxDate",dateText);
						}
					});

					$(".search-result-fail .release-need span").click(function(){
						$('#wish-model-info').html('');
						$('.wish-model form,.wish-model-box,.wish-model h3').show();
					})
					$("span.wish-model-back,.wish-model-close").click(function(){
						$(".wish-model-box").hide();
						$('#wish-model-info').html('');
					})
					//去分享
					//提交需求
					$('#submit').click(function(){
						//是否登录
						if (!{$login}) {
							  	window.location.href="{:url("/user/login",'','','user')}"
						}
						var data = $('#wishform').serialize();
						$.ajax({
							type:"post",
							url:"/wishs/save",
							data:data,
							dataType:'json',
							success:function(data){
								if(data.code===20003){
									$('#tishi-msg').html(data.message);
									$('#shsy-coin-bounced-box').show();
									$('.wish-model-box').hide();
									$('#tishi-share').show();
									return false;
								}
								if(data.code===60007 || data.code===60006){
									$('#tishi-msg').html(data.message);
									$('#shsy-coin-bounced-box').show();
									$('.wish-model-box').hide();
									return false;
								}
								if(data.code==1){
									$('#tishi-msg').html('发布成功');
									$('#shsy-coin-bounced-box').show();
									$('.wish-model-box').hide();
									
								}
							}
						});
					})
				</script>
				<!--接单规则弹出框开始-->
				<div id="receiving-rule" style="display: none;">
					<div class="receiving-rule-bg"></div>
					<div class="receiving-rule-bounced">
						<div class="rule-bounced" style="background:#fff;">
							<p>温馨提示! <span id="closeSpan" style="float: right;margin-right: 10px; cursor: pointer;">关闭</span></p>
							<dl>
								<dt></dt>
							</dl>
						</div>
					</div>
				</div>
				<!--接单规则弹出框结束-->
				<!-- 发布需求弹框end -->
				<!--其他城市推荐结束-->
				<!--其他城市推荐开始-->
				{if !empty($list2)}
				<div class="other-time-title">
					其他城市推荐
				</div>
				{/if}
				{volist name='list2' id='vo'}
				<div class="search-result-list">
					<div class="exchange-carvan-img">
						<ul class="lunbo-img-box" >
							{if !empty($vo['caravan']['piccaravan']['0'])}
							<li class="lunbo-img-list"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.s}&edate={$vo.e}"><img src="{$vo.caravan.piccaravan['0']}" alt="车主未上传图片" /></a></li>
							{/if}
							{if !empty($vo['caravan']['piccaravan']['1'])}
							<li class="lunbo-img-list"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.s}&edate={$vo.e}"><img src="{$vo.caravan.piccaravan['1']}" alt="车主未上传图片" /></a></li>
							{/if}
							{if !empty($vo['caravan']['piccaravan']['2'])}
							<li class="lunbo-img-list"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.s}&edate={$vo.e}"><img src="{$vo.caravan.piccaravan['2']}" alt="车主未上传图片" /></a></li>
							{/if}
						</ul>
						<ul class="switch-img-btn">
						</ul>
					</div>
					<div class="exchange-caravan-impInfo">
						<h3>{$vo.caravan.name}</h3>
						<p>价格：
						{foreach $vo['jg'] as $k=>$v}
						{if $k==1}和{/if}
						<strong>{$v.amount}</strong>{$v['ch_types']}
						{/foreach}
						</p>
						<p>可交换时间：<i>{$vo.sdate}</i>至<i>{$vo.edate}</i></p>
						<p><a href="###">{$vo.camp.name}</a></p>
						<p>地址：{$vo.camp.address}</p>
					</div>
					<ul class="exchange-caravan-basicInfo">
						<li>{$vo->getCates($vo['caravan']['car_cates_id'])}</li>
						<li>可住{$vo.caravan.people_num}人</li>
						<li>{$vo.caravan.double_bed_num}张双人床</li>
						<li>{$vo.caravan.single_bed_num}张单人床</li>
						<li>{$vo->getradioname($vo['caravan']['kitchen'])}厨房</li>
						<li>{$vo->getradioname($vo['caravan']['bathroom'])}洗手间</li>
					</ul>
					<div class="exchange-get-order">
						
						<p class="get-order-btn"><a href="/reserve/caravandetail?id={$vo.caravan.id}&sdate={$vo.sdate}&edate={$vo.edate}">查看详情</a> </p>
						<p class="get-order-btn"><a href="/reserve/jumpwhich?id={$vo.caravan.id}&sdate={$vo.sdate}&edate={$vo.edate}">直接下单</a> </p>
					</div>
				</div>
				{/volist}
				{if !empty($list2)}
				<div class="search-result-list" id="look-more-2" style="display: block;">
					<span id="more" class="look-more">查看更多</span>
				</div>
				{/if}
				<!--没有搜索到结果-->
				<!--其他城市推荐结束-->
				<!-- 加载列表二 -->
				<script type="text/javascript">
					$(document).ready(function(){
						var page = 2;
						var a = {$a};
						var b = {$b};
						$("#more").click(function(){
							var filter_info = {};
							filter_info['sdate'] = $('#selstartdate').val();
							filter_info['edate'] = $('#selendate').val();
							filter_info['car_area'] = '{:input('city')}';
							//城市
							 $.ajax({
						        type:"post",
						        url:"/filter/ajaxlist2?"+Math.random(),
						        data:{'filter_info':filter_info,page:page},
						        dataType:'json',
						        success: function(data){
						        	page++;
						        	if (false==data) {
						        		 $('#more').text('没有更多信息了');
						        		 return;
						        	}
						        	$.each(data,function(vo,list)
						              {
						              	var str = '';
						              	var s = '';
						              	for (var i = 0; i < list.caravan.piccaravan.length; i++) {
						              		str += '<li class="lunbo-img-list"><a href="/reserve/caravandetail?id='+list.caravan.id+'&sdate='+list.sdate+'&edate='+list.edate+'"><img src="'+list.caravan.piccaravan[i]+'" alt="车主未上传图片" /></a></li>';
						              		}
						              	for (var i = 0; i < list.jg.length; i++) {
						              		if (i == 1) {
						              			s = s + ' {:lang("and")} ';
						              		}
						              		s = s + '<strong>'+list.jg[i]['amount']+'</strong>' + list.jg[i]['ch_types'];
						              	}
						              $('#more').parent().before(
									    '<div class="search-result-list">'+
											'<div class="exchange-carvan-img">'+
												'<ul class="lunbo-img-box" >'+str+
												'</ul>'+
												'<ul class="switch-img-btn">'+
												'</ul>'+
											'</div>'+
											'<div class="exchange-caravan-impInfo">'+
												'<h3>'+list.caravan.name+'</h3>'+
												'<p>价格：'+s+
												'<p>可交换时间：<i>'+list.sdate+'</i>至<i>'+list.edate+'</i></p>'+
												'<p><a href="###">'+list.camp.name+'</a></p>'+
												'<p>地址：'+list.camp.name+'</p>'+
											'</div>'+
											'<ul class="exchange-caravan-basicInfo">'+
												'<li>'+a[list.caravan.car_cates_id]+'</li>'+
												'<li>'+list.caravan.people_num+'可住人</li>'+
												'<li>'+list.caravan.double_bed_num+'张双人床</li>'+
												'<li>'+list.caravan.single_bed_num+'张单人床</li>'+
												'<li>'+b[list.caravan.kitchen]+'厨房</li>'+
												'<li>'+b[list.caravan.bathroom]+'洗手间</li>'+
											'</ul>'+
											'<div class="exchange-get-order">'+
												'<p class="get-order-btn"><a href="/reserve/caravandetail?id='+list.caravan.id+'&sdate='+list.sdate+'&edate='+list.edate+'">查看详情</a> </p>'+
												'<p class="get-order-btn"><a href="/reserve/jumpwhich?id='+list.caravan.id+'&sdate='+list.sdate+'&edate='+list.edate+'">直接下单</a> </p>'+
											'</div>'+
										'</div>'
							             );
						             })
						        }
					      	});   
						})	    
					});
				</script>	
				<!-- 加载列表二结束 -->
			</div>
			<!--搜素结果结束-->
		</div>
		<!--交换房车列表结束-->

<!-- <script type="text/javascript">
      $("#a").addClass("single-menu-home");
</script> -->